<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>通用日志</title>

    <script charset="utf-8" type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script charset="utf-8" type="text/javascript" src="/js/com.wxd.js"></script>
    <script charset="utf-8" type="text/javascript" src="/pageview.js"></script>

    <link rel="stylesheet" type="text/css" href="/style/com.wxd.css"/>
    <link rel="stylesheet" type="text/css" href="/style/table.css"/>

    <style>
        html, body {display: block;width: 100%;height: 100%;overflow: hidden;overflow-x: auto;background: rgb(255, 255, 255);}

        a:link {color: #0866b4;}

        a:visited { color: #0866b4;}

        label {margin: 0 0 0 15px;}

    </style>

    <script>

        let pageView;

        function search() {
            wxd.loading();
            let urlQuery = new wxd.Map().loadSearch();
            urlQuery.put("account", $("#account").val());
            urlQuery.put("roleId", $("#roleId").val());
            urlQuery.put("roleName", $("#roleName").val());
            urlQuery.put("other", $("#other").val());
            urlQuery.put("minDay", $("#minDay").val());
            urlQuery.put("maxDay", $("#maxDay").val());
            pageView.remoteGetData(urlQuery);
        }

        function createRow(index, row) {
            let tr = `
    <tr>
        <td tips="true" style="width: 70px;">${index}</td>
        <td tips="true" style="width: 140px;">${row.createTime}</td>
        <td tips="true" style="width: 200px;">${row.account}</td>
        <td tips="true" style="width: 140px;">${row.roleId}</td>
        <td tips="true" style="width: 120px;">${row.roleName}</td>
        <td tips="true" style="width: 40px;">${row.sid}</td>
        <td tips="true" style="">${row.other}</td>
    </tr>
`;
            return tr;
        }

        $(() => {
            pageView = new PageView("/log/role/slog/list", search, createRow);
            search();
        });

    </script>

</head>

<body>
<div class="btn_box" style="text-align: left;padding-left: 10px;">
    <button class="submit" type="button" onclick="search();">搜索</button>
    <label for="minDay">范围日期-开始日期: </label><input id="minDay" type="date"/>
    <label for="maxDay">范围日期-结束日期: </label><input id="maxDay" type="date"/>
    <br>
    <input id="account" type="text" value="" style="" onkeydown="if (event.keyCode===13)search();" placeholder="账号"/>
    <input id="roleId" type="text" value="" style="" onkeydown="if (event.keyCode===13)search();" placeholder="玩家ID"/>
    <input id="roleName" type="text" value="" style="" onkeydown="if (event.keyCode===13)search();" placeholder="玩家名字"/>
    <input id="other" type="text" value="" style="" onkeydown="if (event.keyCode===13)search();" placeholder="a=b"/>
</div>
<div class="tableDom" style="position: absolute;left: 10px;top: 100px;right: 15px;bottom: 35px;">
    <table>
        <thead>
        <tr>
            <th style="width: 70px;">序号</th>
            <th style="width: 140px;">日志时间</th>
            <th style="width: 200px;">账号</th>
            <th style="width: 140px;">角色ID</th>
            <th style="width: 120px;">角色名字</th>
            <th style="width: 40px;">区服</th>
            <th style="">记录</th>
        </tr>
        </thead>
        <tbody>

        </tbody>
    </table>
</div>
</body>
</html>